<nav class="navbar navbar-expand-md navbar-light navbar-laravel">
    <div class="container-fluid row ">
        <a class="navbar-brand col-2" href="{{ url('/') }}">
            {{ config('app.name', 'Laravel') }}
        </a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse col" id="navbarSupportedContent">
            <!-- Left Side Of Navbar -->
            <ul class="navbar-nav m-auto">
                @if(isset($navShow)&&$navShow)
                    @foreach($appRepository->getNav() as $item)
                        <li class="nav-item">
                            <a  class="nav-link" href="{{url($item->point_url)}}">
                                {{$item->name}}
                                <p class="desc"> {{$item->sub_name}}</p>
                            </a>
                        </li>
                    @endforeach
                @endif
            </ul>
            <!-- Right Side Of Navbar -->
            <ul class="navbar-nav ml-auto">
                <!-- Authentication Links -->
                @guest
                    <li class="nav-item">
                        <a class="nav-link" href="{{ route('login') }}">{{ __('登陆') }}</a>
                    </li>
                    <li class="nav-item">
                        <p class="na_center hidden-xs">|</p>
                    </li>
                    <li class="nav-item border-light">
                        <a class="nav-link" href="{{ route('register') }}">{{ __('注册') }}</a>
                    </li>
                @else
                    <li class="nav-item dropdown">
                        <a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button"
                           data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
                            你好，{{ \Auth::user()->student?\Auth::user()->student->name:'' }} <span class="caret"></span>
                        </a>

                        <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
                            <a class="dropdown-item" href="{{ route('user-center') }}">
                                {{ __('个人中心') }}
                            </a>

                            <a class="dropdown-item" href="{{ route('logout') }}"
                               onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">
                                {{ __('登出') }}
                            </a>

                            <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
                                @csrf
                            </form>
                        </div>
                    </li>
                @endguest
            </ul>
        </div>
    </div>
</nav>